# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-smbc
_pkgname=pysmbc
pkgver=1.0.25.1
pkgrel=2
pkgdesc="Python3 bindings for libsmbclient"
url="https://github.com/hamano/pysmbc"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="python3-dev samba-dev py3-setuptools"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hamano/pysmbc/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check"

build() {
	python3 setup.py build
}
# add at a later point in time when they have self contained tests
# checkdepends="py3-nose"
# check() {
# 	# can't run checks at all in such an environment, we'd need to run a samba server.
# 	# From README.md of upstream repo:
# 	# NOTE: to run your tests, you need

#     # - a running samba server
# 	# - one shared folder with
# 	# - rw permissions
# 	# - guest ok = no

# 	# Makefile uses "python" not "python3" so we can't use it verbatim.
# 	# Just copying the .so file is exactly what the Makefile does too.
# 	mv build/lib*/_smbc*.so .
# 	nosetests
# }

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
777960fb15e16f9cb7fb03cbf9985cca1f734fc1e078bd570a28833c70013008f921b02c1755a6d92c902797cf2f7a7c0a05e866b2b7a380bdedcb1cd555efba  py3-smbc-1.0.25.1.tar.gz
"
